package zms.roya.math.digui;

import java.io.File;

public class ListFileName {
 
	public static void main(String[] args) {
		
	   File file=new File("src");
	  System.out.println(file.getName());
      
	    ListFileName lst=new ListFileName();
	     lst.PrintTree(file,0);

	}
	
	public void PrintTree(File name,int level)
	{
		String prestr="  ";
		for (int i=0;i<level;i++)
		{
			prestr=prestr+"  ";
		}
		File[] childs=name.listFiles();
		for (int i=0;i<childs.length;i++)
		{
			System.out.println(prestr+"-"+childs[i].getName());
			if (childs[i].isDirectory()){
				PrintTree(childs[i],level+1);
			}
		}
	}
	
 

}
